/* $Id: proto.h,v 1.14 2007/03/17 16:57:08 sby Exp $ */

/* get_ip_address.c */
int get_ip_address(const struct sockaddr *sa, char *host, size_t hostlen);
/* ipv6_dns_ident.c */
void ipv6_dns_ident(int sock, struct sockaddr_in6 *from, char *rhost, char *ruser);
/* ipv6_dns_name.c */
int ipv6_dns_name(const struct sockaddr *sa, char *host, size_t hostlen);
/* is_alnum.c */
int is_alnum(int ch);
/* is_alpha.c */
int is_alpha(int ch);
/* is_fpath.c */
int is_fpath(char *path);
/* not_addr.c */
int not_addr(char *addr);
/* dns_addr.c */
unsigned long dns_addr(char *name);
/* dns_name.c */
int dns_name(unsigned char *addr, char *name);
/* dns_smtp.c */
void dns_mx(char *domain, char *mxlist);
int dns_smtp(char *host);
/* dns_ident.c */
void dns_ident(int sock, struct sockaddr_in *from, char *rhost, char *ruser);
/* dns_open.c */
unsigned long dns_a(char *host);
int dns_open(char *host, int port);
/* dns_aton.c */
unsigned long dns_aton(char *name);
/* str_decode.c */
void str_decode_M3(char *str);
/* str_dup.c */
char *str_dup(char *src, int pad);
/* str_fpath.c */
void setdirpath(char *fpath, char *direct, char *fname);
/* str_from.c */
int str_from(char *from, char *addr, char *nick);
/* str_lower.c */
void str_lower(char *dst, char *src);
/* str_passwd.c */
char *genpasswd(char *pw);
int checkpasswd(char *passwd, char *test);
/* str_stamp.c */
void str_stamp(char *str, time_t *chrono);
/* str_tail.c */
char *str_tail(char *str);
/* str_time.c */
char *Ctime(const time_t *clock);
char *Etime(const time_t *clock);
/* str_trim.c */
void str_trim(char *buf);
/* str_ttl.c */
char *str_ttl(char *title);
/* str_trim2.c */
char *trim2(char *buffer);
/* radix32.c */
/* f_cat.c */
void f_cat(char *fpath, char *msg);
/* f_cp.c */
int f_cp(const char *src, const char *dst, const int mode);
/* f_img.c */
char *f_img(char *fpath, int *fsize);
/* f_ln.c */
int f_ln(char *src, char *dst);
/* f_map.c */
char *f_map(char *fpath, int *fsize);
/* f_mode.c */
int f_mode(char *fpath);
/* f_mv.c */
int f_mv(const char *src, const char *dst);
/* f_pid.c */
void f_pid(const char *buf);
/* f_open.c */
int f_open(char *fpath);
/* f_path.c */
void brd_fpath(char *fpath, char *board, char *fname);
void gem_fpath(char *fpath, char *board, char *fname);
void usr_fpath(char *fpath, char *user, char *fname);
/* f_rm.c */
int f_rm(char *fpath);
/* f_suck.c */
void f_suck(FILE *fp, char *fpath);
/* mak_dirs.c */
void mak_dirs(char *fpath);
/* f_lock.c */
int f_exlock(int fd);
int f_unlock(int fd);
/* rec_add.c */
int rec_add(const char * const fpath, void *data, int size);
/* rec_num.c */
int rec_num(char *fpath, int size);
/* rec_get.c */
int rec_get(const char * const fpath, void *data, int size, int pos);
/* rec_ins.c */
int rec_ins(char *fpath, void *data, int size, int pos, int num);
/* rec_mov.c */
int rec_mov(char *data, int size, int from, int to);
/* rec_put.c */
int rec_put(char *fpath, void *data, int size, int pos);
/* rec_apply.c */
int rec_apply(const char * const fpath, int (*fptr)(void), int size);
/* shm.c */
void *shm_new(int shmkey, int shmsize);
/* sem.c */
void sem_init(int semkey, int *semid);
void sem_lock(int op, int semid);
/* dl_lib.c */
void *DL_get(char *name);
int DL_func(const char *name, ...);
/* setpf.c */
void setadir(char *buf, const char *path);
void setafile(char *buf, const char *boardname, const char *fname);
void setapath(char *buf, const char *boardname);
void setbfile(char *buf, const char *boardname, const char *fname);
void setbgdir(char *buf, const char *boardname);
void setbpath(char *buf, const char *boardname);
void sethomedir(char *buf, const char *userid);
void sethomefile(char *buf, const char *userid, const char *fname);
void sethomeman(char *buf, const char *userid);
void sethomepath(char *buf, const char *userid);
/* strip_ansi.c */
int strip_ansi(char *buf, char *str, int mode);
/* args.c */
void initsetproctitle(int argc, char **argv, char **envp);
void printpt(const char *format, ...);
int countproctitle(void);
/* cut_ansistr.c */
int cut_ansistr(char *buf, char *str, int len);
/* isprint2.c */
int isprint2(int ch);
/* not_alnum.c */
int not_alnum(int ch);
/* not_alpha.c */
int not_alpha(int ch);
/* strstr_lower.c */
int strstr_lower(char *str, char *tag);
/* nextfield.c */
char *nextfield(register char *data, register char *field);
/* bad_user.c */
int bad_user(char *name);
/* counter.c */
void counter(char *filename, char *modes, int n);
/* file_list_count.c */
int file_list_count(char *fname);
/* b_suckinfile.c */
void b_suckinfile(FILE *fp, char *fname);
/* url_encode.c */
void url_encode(unsigned char *dst, unsigned char *src);
/* socket.c */
int Get_Socket(char *site, int *sock);
int POP3_Check(char *site, char *account, char *passwd);
/* dns.c */
void dns_init(void);
/* rfc2047.c */
void output_rfc2047_qp(FILE *fp, char *prefix, char *str, char *charset, char *suffix);
